/**
    ATClab - scriptable Air Traffic Control simulations.
    Copyright (C) 2010 openatclab@gmail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
**/

#include "sectorsprite.h"
#include "atc.h"
#include "canvas.h"

using namespace atc;

////////////////////////////////////////////////////////////////////////////////
//
// atc::SectorSprite
//
//-----------------------------------------------------------------------------
//
//

/*!
 * Constructor
 *
 * Adds the sprite to the canvas. The canvas will clean up sprites associated
 * with it in this way ie they take responsibility.
 */
SectorSprite::SectorSprite( Q3Canvas *canvas )
	  : Q3CanvasPolygon(canvas)
{
	setBrush( SECTOR_BRUSH );
	setZ( SECTOR_AREA_Z );
}

/*!
 * Destructor
 */
SectorSprite::~SectorSprite() {
	hide();
}

////////////////////////////////////////////////////////////////////////////////
//
// atc::ActiveSectorSprite
//
//-----------------------------------------------------------------------------
//
//

/*!
 * Constructor
 *
 * Adds the sprite to the canvas. The canvas will clean up sprites associated
 * with it in this way ie they take responsibility.
 */
ActiveSectorSprite::ActiveSectorSprite( Q3Canvas *c )
	  : SectorSprite( c )
{
	setBrush( SECTOR_ACTIVE_BRUSH );
	setZ( SECTOR_ACTIVE_AREA_Z );
}

/*!
 * Destructor
 */
ActiveSectorSprite::~ActiveSectorSprite() {
	hide();
}

//-----------------------------------------------------------------------------
